/****************************************************************
 * Fulguro
 * Copyright (C) 2004 Christophe Clienti
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 ***************************************************************/

#ifdef __cplusplus
extern "C" {
#endif


#ifndef __FLGR_DATA_TOOLS_STATIC_FIFO_H
#define __FLGR_DATA_TOOLS_STATIC_FIFO_H 

#include <flgrCoreDll.h>
#include <flgrCoreTypes.h>

  /*! \struct FLGR_StaticFifo
   * Fifo for storing Image pixel index
   */
  typedef struct {
    /*! Row pixel index array */
    int *row;
    /*! Column pixel index array */
    int *col;
    /*! Read pointer  */
    int rdptr;
    /*! Write pointer  */
    int wrptr;
    /*! Maximum Size of the fifo  */
    int size;
    /*! Row number of the image used for the fifo */
    int size_y;
    /*! Column number of the image used for the fifo */
    int size_x;
  }FLGR_StaticFifo;



  EXPORT_LIB FLGR_StaticFifo *flgr_static_fifo_init(int size_y, int size_x);
  EXPORT_LIB void flgr_static_fifo_write(FLGR_StaticFifo *f, int row, int col);
  EXPORT_LIB void flgr_static_fifo_read(FLGR_StaticFifo *f, int *row, int *col);
  EXPORT_LIB int flgr_static_fifo_is_empty(FLGR_StaticFifo *f);
  EXPORT_LIB int flgr_static_fifo_level(FLGR_StaticFifo *f);
  EXPORT_LIB void flgr_static_fifo_destroy(FLGR_StaticFifo *f);





#endif

#ifdef __cplusplus
}
#endif
